package weapon

import (
	"fmt"
	"math"
	"ys.calc/pointFunction"
	"ys.calc/role"
)

func InitAmos(refineLevel float64, times float64) Weapon {
	var subStatValue = 49.6
	var mainStateValue = 608.0

	return Weapon{
		Name:     fmt.Sprintf("精%d阿莫斯%d层", int(refineLevel), int(times)),
		Atk:      mainStateValue,
		Code:     1,
		SubState: subStatValue,
		SubStateFunc: func(r *role.Role) {
			pointFunction.PercentATK(subStatValue, r)
		},
		SpFunc: func(r *role.Role) {
			AmosSp(refineLevel, times, r)
		},
	}
}
func AmosSp(refineLevel float64, times float64, r *role.Role) {
	minTimes := math.Min(5, times)
	refineLevel = math.Min(5, refineLevel)
	refine := 1 + (refineLevel-1)*0.25
	r.Increase += 12*refine + 8*refine*minTimes
}
